<?php

Yii::import('common.models.db.ShopOrderTransactionModel');

class FrontendShopOrderTransactionModel extends ShopOrderTransactionModel
{
	public static function model($className=__CLASS__) {
		return parent::model($className);
	}
	public static function getOrderByUser($userId)
	{
		$sql = "SELECT * FROM shop_order_transaction WHERE user_id=:id ORDER BY id DESC";
		$command = Yii::app()->db->createCommand($sql);
		$command->bindParam(':id', $userId, PDO::PARAM_INT);
		return $command->queryAll();
	}
}